package com.carl.zeus.config.websocket;

import com.carl.zeus.common.emnu.UserStatus;
import com.carl.zeus.model.system.SysUser;
import lombok.Data;

import javax.websocket.Session;

/**
 *
 */
@Data
public class SocketUser {
    /**
     * webSocket session
     */
    private Session session;
    /**
     * 用户
     */
    private SysUser user;
    
    /**
     * 当前用户是否在线
     */
    public boolean isOnline() {
        return UserStatus.NotOnline == this.user.getState();
    }

}
